|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.framework.engine.support.AbstractReporter
org.eclipse.vtp.framework.engine.support.AbstractLogger
org.eclipse.vtp.framework.engine.support.AbstractContext
org.eclipse.vtp.framework.engine.support.AbstractExecutionContext
public abstract class AbstractExecutionContext
A support implementation of the IExecutionContext interface.
| Field Summary | |
|---|---|
protected IExecutionDescriptor |
descriptor
The execution descriptor. |
protected java.util.Set |
providedServiceIdentifiers
The service identifiers provided by the descriptor. |
protected static java.util.Set |
RESERVED_SERVICE_IDENTIFIERS
The service identifiers that will return this context. |
protected ISessionContext |
sessionContext
The context of the session that created this execution. |
| Fields inherited from interface org.eclipse.vtp.framework.core.IReporter |
|---|
SEVERITY_DEBUG, SEVERITY_ERROR, SEVERITY_INFO, SEVERITY_WARN |
| Constructor Summary | |
|---|---|
protected |
AbstractExecutionContext(ISessionContext sessionContext,
IExecutionDescriptor descriptor)
Creates a new AbstractExecutionContext. |
| Method Summary | |
|---|---|
void |
clearAttribute(java.lang.String attributeName)
Clears the value of a session-level attribute. |
void |
clearParameter(java.lang.String parameterName)
Clears the value of the execution-level parameter with the specified name. |
protected void |
doReport(int severity,
java.lang.String[] categories,
java.lang.String message,
java.util.Dictionary properties)
Implementation of report creation and publication after checking the severity. |
java.lang.Object |
getAttribute(java.lang.String attributeName)
Returns the value of a session-level attribute with the specified name or null if no such attribute exists. |
java.lang.String[] |
getAttributeNames()
Returns the names of all the session-level attributes currently registered. |
java.lang.String |
getExecutionID()
Returns the ID of this execution. |
java.lang.String |
getParameter(java.lang.String parameterName)
Returns the value of the execution-level parameter with the specified name or null if no such parameter exists. |
java.lang.String[] |
getParameterNames()
Returns the names of the parameters available to the execution sequence. |
java.lang.String[] |
getParameters(java.lang.String parameterName)
Returns the values of the execution-level parameter with the specified name or null if no such parameter exists. |
java.lang.String |
getProcessID()
Returns the ID of this process. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Returns the value of the process-level configuration property with the specified name or null if no such property exists. |
java.lang.String |
getSessionID()
Returns the ID of the current session. |
boolean |
isSeverityEnabled(int severity)
Returns true if the specified severity level is enabled. |
java.lang.Class |
loadClass(java.lang.String className)
Loads a class visible to the process. |
protected java.lang.Object[] |
lookupAllInheritedServices(java.lang.String identifier)
Returns all the services registered under the specified identifier in any ancestor registry or null if no such services can be found. |
protected java.lang.Object[] |
lookupAllLocalServices(java.lang.String identifier)
Returns all the services registered under the specified identifier in this registry or null if no such services can be found. |
protected java.lang.Object |
lookupInheritedService(java.lang.String identifier)
Returns a service registered under the specified identifier in any ancestor registry or null if no such service exists. |
protected java.lang.Object |
lookupLocalService(java.lang.String identifier)
Returns a service registered under the specified identifier in this registry or null if no such service exists. |
protected java.lang.Object |
lookupReservedService(java.lang.String identifier)
Returns the reserved service if the specified identifier is one of the reserved identifiers or null if these conditions are not
met. |
void |
setAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
Sets the value of a session-level attribute or clears it if the supplied value is null. |
void |
setParameter(java.lang.String parameterName,
java.lang.String value)
Sets the value of the execution-level parameter with the specified name or clears it if the value is null. |
void |
setParameters(java.lang.String parameterName,
java.lang.String[] values)
Sets the values of the execution-level parameter with the specified name or clears them if the value is null or empty. |
| Methods inherited from class org.eclipse.vtp.framework.engine.support.AbstractContext |
|---|
lookup, lookupAll |
| Methods inherited from class org.eclipse.vtp.framework.engine.support.AbstractLogger |
|---|
debug, debug, debug, debug, doLog, error, error, error, error, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, log, log, log, log, warn, warn, warn, warn |
| Methods inherited from class org.eclipse.vtp.framework.engine.support.AbstractReporter |
|---|
report, report, report, report |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.vtp.framework.core.IContext |
|---|
lookup, lookupAll |
| Methods inherited from interface org.eclipse.vtp.framework.core.ILogger |
|---|
debug, debug, debug, debug, error, error, error, error, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, log, log, log, log, warn, warn, warn, warn |
| Methods inherited from interface org.eclipse.vtp.framework.core.IReporter |
|---|
report, report, report, report |
| Field Detail |
|---|
protected static final java.util.Set RESERVED_SERVICE_IDENTIFIERS
protected final ISessionContext sessionContext
protected final IExecutionDescriptor descriptor
protected final java.util.Set providedServiceIdentifiers
| Constructor Detail |
|---|
protected AbstractExecutionContext(ISessionContext sessionContext,
IExecutionDescriptor descriptor)
throws java.lang.NullPointerException
sessionContext - The context of the session that created this
execution.descriptor - The execution descriptor.
java.lang.NullPointerException - If the supplied session context is
null.
java.lang.NullPointerException - If the supplied descriptor is
null.| Method Detail |
|---|
protected void doReport(int severity,
java.lang.String[] categories,
java.lang.String message,
java.util.Dictionary properties)
AbstractReporter
doReport in class AbstractReporterseverity - The severity of the report.categories - The categories the report pertains to or
null if no catagories are related.message - The message associated with the report or null
to not include a message.properties - The properties of the report or null if no
properties are specified.public boolean isSeverityEnabled(int severity)
IReporter
isSeverityEnabled in interface IReporterseverity - The severity to check.
protected java.lang.Object lookupReservedService(java.lang.String identifier)
AbstractContextnull if these conditions are not
met.
lookupReservedService in class AbstractContextidentifier - The identifier of the service to return, will never be
null.
null if these conditions are
not met.protected java.lang.Object lookupLocalService(java.lang.String identifier)
AbstractContextnull if no such service exists.
lookupLocalService in class AbstractContextidentifier - The identifier of the service to return, will never be
null.
null if no such service exists.protected java.lang.Object[] lookupAllLocalServices(java.lang.String identifier)
AbstractContextnull if no such services can be found.
lookupAllLocalServices in class AbstractContextidentifier - The identifier of the services to return, will never be
null.
null if no such services can be found.protected java.lang.Object lookupInheritedService(java.lang.String identifier)
AbstractContextnull if no such service exists.
lookupInheritedService in class AbstractContextidentifier - The identifier of the service to return, will never be
null.
null if no such service exists.protected java.lang.Object[] lookupAllInheritedServices(java.lang.String identifier)
AbstractContextnull if no such services can be found.
lookupAllInheritedServices in class AbstractContextidentifier - The identifier of the services to return, will never be
null.
null if no such services can be
found.public final java.lang.String getProcessID()
IProcessContext
getProcessID in interface IProcessContext
public final java.lang.Object getProperty(java.lang.String propertyName)
throws java.lang.NullPointerException
IProcessContextnull if no such property exists.
getProperty in interface IProcessContextpropertyName - The name of the configuration property to return.
null if no such property exists.
java.lang.NullPointerException - If the supplied property name is
null.
public final java.lang.Class loadClass(java.lang.String className)
throws java.lang.ClassNotFoundException,
java.lang.NullPointerException
IProcessContext
loadClass in interface IProcessContextclassName - The name of the class to load.
java.lang.ClassNotFoundException - If a class with the specified name cannot be
found.
java.lang.NullPointerException - If the supplied class name is
null.public final java.lang.String getSessionID()
ISessionContext
getSessionID in interface ISessionContextpublic final java.lang.String[] getAttributeNames()
ISessionContext
getAttributeNames in interface ISessionContext
public final java.lang.Object getAttribute(java.lang.String attributeName)
throws java.lang.NullPointerException
ISessionContextnull if no such attribute exists.
getAttribute in interface ISessionContextattributeName - The name of the session attribute to return.
null if no such attribute exists.
java.lang.NullPointerException - If the supplied attribute name is
null.
public final void setAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
throws java.lang.NullPointerException
ISessionContextnull.
setAttribute in interface ISessionContextattributeName - The name of the session attribute to set.attributeValue - The value to set the attribute to or
null to clear the attribute.
java.lang.NullPointerException - If the supplied attribute name is
null.
public final void clearAttribute(java.lang.String attributeName)
throws java.lang.NullPointerException
ISessionContext
clearAttribute in interface ISessionContextattributeName - The name of the session attribute to clear.
java.lang.NullPointerException - If the supplied attribute name is
null.public final java.lang.String getExecutionID()
IExecutionContext
getExecutionID in interface IExecutionContextpublic final java.lang.String[] getParameterNames()
IExecutionContext
getParameterNames in interface IExecutionContext
public final java.lang.String getParameter(java.lang.String parameterName)
throws java.lang.NullPointerException
IExecutionContextnull if no such parameter exists.
getParameter in interface IExecutionContextparameterName - The name of the parameter to return.
null if no such parameter exists.
java.lang.NullPointerException - If the supplied parameter name is
null.
public final java.lang.String[] getParameters(java.lang.String parameterName)
throws java.lang.NullPointerException
IExecutionContextnull if no such parameter exists.
getParameters in interface IExecutionContextparameterName - The name of the parameter to return.
null if no such parameter exists.
java.lang.NullPointerException - If the supplied parameter name is
null.
public void setParameter(java.lang.String parameterName,
java.lang.String value)
throws java.lang.NullPointerException
IExecutionContextnull.
setParameter in interface IExecutionContextparameterName - The name of the parameter to set.value - The value of the execution-level parameter with the specified
name or null to clear the value.
java.lang.NullPointerException - If the supplied parameter name is
null.
public void setParameters(java.lang.String parameterName,
java.lang.String[] values)
throws java.lang.NullPointerException
IExecutionContextnull or empty.
setParameters in interface IExecutionContextparameterName - The name of the parameters to set.values - The values of the execution-level parameter with the
specified name or null or to clear the values.
java.lang.NullPointerException - If the supplied parameter name is
null.
public void clearParameter(java.lang.String parameterName)
throws java.lang.NullPointerException
IExecutionContext
clearParameter in interface IExecutionContextparameterName - The name of the parameter to clear.
java.lang.NullPointerException - If the supplied parameter name is
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||